package com.qxgl.qxglt.dao;

import javax.transaction.Transactional;

import com.qxgl.qxglt.model.Roles;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface IRolesDao extends JpaRepository<Roles,String>,JpaSpecificationExecutor<Roles>{
    @Transactional
    @Modifying
    @Query("delete from Roles r where r.id=:id")
    int delById(String id);//根据id删除用户
}